package com.tuanzi.loan.web.lazy.galaxycard;

import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import org.springframework.data.domain.Page;

import com.tuanzi.loan.vo.request.galaxycard.GalaxyCardUserInfoSearchRequest;
import com.tuanzi.loan.vo.response.galaxycard.GalaxyCardUserInfoSearchResponse;
import com.tuanzi.loan.business.service.galaxycard.GalaxyCardUserInfoService;

/**
 * 银河黑卡用户信息 DataModel
 * @author JinRuiyang 2018/1/8 18:43:07
 */
public class GalaxyCardUserInfoDataModel extends
        BaseLazyDataModel<GalaxyCardUserInfoSearchRequest, GalaxyCardUserInfoSearchResponse> {

    private GalaxyCardUserInfoService galaxycarduserinfoService = SpringContextHolder.getBean(GalaxyCardUserInfoService.class);

    public GalaxyCardUserInfoDataModel(GalaxyCardUserInfoSearchRequest searchRequest) {
        super(searchRequest);
    }

    @Override
    protected Page<GalaxyCardUserInfoSearchResponse> doLoad(PageSearcher<GalaxyCardUserInfoSearchRequest> pageSearcher) {
        return galaxycarduserinfoService.list(pageSearcher);
    }
}
